﻿CREATE FUNCTION [dbo].[PaymentDPDs](
	@UsixID varchar(8),
	@CompanyID int
)RETURNS TABLE 
RETURN
SELECT     DPD30, DPD60, DPD90,DPD120, DPDA
FROM         usix.v_PaymentDPDs
WHERE     ([Id #] = @UsixID) AND (CompanyID = @CompanyID)